package com.itcast.admin.controller;

import com.itcast.common.model.dto.request.SetmealCategoryReqDTO;
import com.itcast.common.model.dto.request.SetmealQueryReqDTO;
import com.itcast.common.model.dto.response.SetmealCategoryResDTO;
import com.itcast.common.model.dto.response.SetmealResDTO;
import com.itcast.security.service.ISetmealService;
import com.jzo2o.common.model.PageResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;


@RestController
@RequestMapping("/admin/setmeal")
public class SetmealController {

    @Resource
    private ISetmealService setmealCategoryService;

    /**
     * 分页查询
     */
    @GetMapping("/pageQuery")
    @ApiOperation("套餐类型分页查询")
    public PageResult<SetmealResDTO> page(SetmealQueryReqDTO setmealQueryReqDTO) {
        PageResult<SetmealResDTO> list = setmealCategoryService.querySetmealCategoryList(setmealQueryReqDTO);
        return list;
    }


    /**
     * 新增套餐
     */
    @PostMapping
    @ApiOperation("新增套餐")
    public SetmealResDTO add(@RequestBody SetmealCategoryReqDTO setmealCategoryReqDTO) {
        return null;
    }

}
